// objects are used quite a bit. Though looks like more legacy code hanging around.

obj
//	var/fixed_bulk = 0
	overlay // This is for the swirly pattern that happens when you heal.
		heal
			icon = 'pc npc.dmi'
			icon_state = "heal"

	proc
		Pickup(mob/pc/M)
			view(M) << "[M] picks up [src]"
			..()

	LoadChar
		mouse_opacity = 2
		text = ""
		icon = 'white.dmi'
		Click()
			if(!usr.ClickedNew)
				var/mob/pc/P = usr
				if(P.PlayerIsSaved(usr))
					P.LoadPlayer(usr)

	NewChar
		mouse_opacity = 2
		text = ""
		icon = 'white.dmi'
		Click()
			var/mob/pc/P = usr
			if(!usr.ClickedNew)
				if(P.PlayerIsSaved(usr))
					switch(alert("[usr], you appear to have an existing character. Do you want to delete it?","New Character","Yes","No"))
						if("Yes")
							P.DeletePlayer(usr)
						if("No")
							return 0
				usr.ClickedNew = 1
				worldplayers ++
				var/Page/L = FindPage("loginform")
				L.DisplayPage(usr)



	object
		proc
			Use(mob/pc/calledby)
				calledby << alert("[src] does nothing")
			Return_worth()
				alert ("RAWR - I can't be bothered pricing me matey's")
				return 1

		New()
			..()
			// make the mouse drag pointer
			var/icon/I = icon(icon, icon_state)	// original icon
			/* note that the icon has the hot spot set in the upper left corner
				to match my dragpointer icon */
			I.Blend('dither50.dmi', ICON_ADD)	// add a 50% dither
			I.Blend('dragpointer.dmi', ICON_OVERLAY)	// overlay the pointer
			mouse_drag_pointer = I


		Weapon
			icon = 'weapons.dmi'
			var
				StrengthVs // Slash, Stab or Impact or all
			SwordBroken
				icon_state = "bsword"
				weight = 1000
				bulk = 5000
			Club
				icon_state = "club"
				weight = 1500
				bulk = 5000
				StrengthVs = "Impact"
			Dagger
				icon_state = "sword"
				weight = 500
				bulk = 500
				StrengthVs = "Stab"
			Hammer
				icon_state = "hammer"
				weight = 2000
				bulk = 3000
				StrengthVs = "Impact"
			HandAxe
				icon_state = "axe"
				weight = 1000
				bulk = 3000
				StrengthVs = "Slash"
			QuaterStaff
				icon_state = "spear"
				weight = 750
				bulk = 5000
				StrengthVs = "Impact"
			Spear
				icon_state = "spear"
				weight = 1500
				bulk = 5000
				StrengthVs = "Impact"
			ShortSword
				icon_state = "sword"
				weight = 1000
				bulk = 5000
				StrengthVs = "Slash"
			Mace
				icon_state = "mace"
				weight = 2500
				bulk = 4375
				StrengthVs = "Impact"
			Flail
				icon_state = "flail"
				weight = 2000
				bulk = 3250
				StrengthVs = "Impact"
			Axe
				icon_state = "axe"
				weight = 1400
				bulk = 7500
				StrengthVs = "Slash"
			WarHammer
				icon_state = "hammer"
				weight = 1400
				bulk = 7500
				StrengthVs = "Impact"
			LongSword
				icon_state = "sword"
				weight = 1500
				bulk = 8000
				StrengthVs = "Slash"
			BattleAxe
				icon_state = "axe"
				weight = 3000
				bulk = 6000
				StrengthVs = "Impact"
			BroadSword
				icon_state = "sword"
				weight = 1600
				bulk = 9000
				StrengthVs = "Slash"
			MorningStar
				icon_state = "flail"
				weight = 3000
				bulk = 9000
				StrengthVs = "Stab"
			BastardSword
				icon_state = "sword"
				weight = 3000
				bulk = 10000
				StrengthVs = "Stab"
			TwoHandedSword
				icon_state = "sword"
				weight = 5000
				bulk = 12000
				StrengthVs = "Slash"

				Staff
					var/uses
					weight = 500
					bulk = 6000

					CureWounds
					Identify
					RuneofReturn
					Healing

				Wand
					var/uses


		Potion

		Scroll

		Armor
			icon = 'items.dmi'
			var
				VsWeak // Slash, Stab or Impact or all
				VsStrong
			Rusty
				icon_state = "brokea"
				weight = 10000
				bulk = 30000
				VsWeak = "All"
				VsStrong = ""
			Leather
				icon_state = "clotha"
				weight = 5000
				bulk = 24000
				VsWeak = "Slash"
				VsStrong = "Impact"
			StudLeather
				icon_state = "clotha"
				weight = 7000
				bulk = 25000
				VsWeak = "Stab"
				VsStrong = "Slash"
			Ring
				icon_state = "steela"
				weight = 8000
				bulk = 30000
				VsWeak = "Impact"
				VsStrong = "Stab"
			Scale
				icon_state = "steela"
				weight = 9000
				bulk = 30000
				VsWeak = "Impact"
				VsStrong = "Slash"
			Chain
				icon_state = "steela"
				weight = 10000
				bulk = 30000
				VsWeak = "Impact"
				VsStrong = "Stab"
			Splint
				icon_state = "steela"
				weight = 12000
				bulk = 40000

			Plate
				icon_state = "steela"
				weight = 15000
				bulk = 60000
				VsWeak = "Impact"
				VsStrong = "Stab"
			MithPlate
				icon_state = "steela"
				weight = 5000
				bulk = 30000
				VsWeak = "Impact"
				VsStrong = "All"
			Elven
				icon_state = "steela"
				weight = 5000
				bulk = 24000
				VsWeak = "Stab"
				VsStrong = "Impact"

		Shield
			Small
				bulk = 15000
				SWooden
					weight = 3000
				SIron
					weight = 4000
				SSteel
					weight = 4000
				SMeteoricSteel
					weight = 2500
					bulk = 10000

			Medium
				bulk = 35000
				MWooden
					weight = 4000
				MIron
					weight = 5000
				MSteel
					weight = 5000
				MMeteoricSteel
					weight = 3500
					bulk = 25000


			Large
				bulk = 50000
				LWooden
					weight = 5000
				LIron
					weight = 6000
				LSteel
					weight = 6000
				LMeteoricSteel
					weight = 4500
					bulk = 35000

		Gauntlets

		Boots

		Cloak
			weight = 500
			bulk = 6000


		Belt

		Ring

		Helmet
			icon = 'items.dmi'
			Broken
				icon_state = "brokeh"
				weight = 1000
				bulk = 1000
			Leather
				icon_state = "leatherh"
				weight = 500
				bulk = 500
			Iron
				icon_state = "ironh"
				weight = 2000
				bulk = 2000
			Steel
				icon_state = "steelh"
				weight = 2500
				bulk = 2000
			MeteoricSteel
				icon_state = "steelh"
				weight = 1000
				bulk = 2000
			SeeInvisable //calls the spell see monsters every time they go on a Z level.
				weight = 2500
				bulk = 2000
				icon_state = "steelh"
			HelmetofStorms
				weight = 1000
				bulk = 2000
				icon_state = "uberh"

		Container
			icon = 'items.dmi'
			// if fixed bulk the shape of the container doesntr change

			Purse
				max_weight = 1
				icon_state = "purse"
				var
					list
						Casharray = list()
				Enter(A)
					// block if it is an obj that is too heavy or bulky
					if(A==src) return
					if(istype(A,/obj/object/Treasure))
						var/obj/object/Treasure/O = A
						src.Casharray[O.name] += O.value
					del(A)
					return ..()




			Bag
				icon_state = "bag"
				Small_bag
					weight = 300
					bulk = 500
					max_weight = 5000
					max_bulk = 6000
				Meduim_bag
					weight = 500
					bulk = 700
					max_weight = 10000
					max_bulk = 12000
				Large_bag
					weight = 900
					bulk = 900
					max_weight = 15000
					max_bulk = 18000
				Broken_bag
					icon_state = "bbag"
					weight = 300
					bulk = 500
					max_weight = 10
					max_bulk = 10


			Pack
				icon_state = "bag2"

				small_pack

					weight = 1000
					max_weight = 12000
					bulk = 1000
					max_bulk = 50000

				medium_pack

					weight = 2000
					max_weight = 22000
					bulk = 1500
					max_bulk = 75000

				large_pack

					weight = 4000
					max_weight = 35000
					bulk = 100000
					max_bulk = 100000
					fixed_bulk = 1

			Chest
				icon_state = "chest"
				large_chest
					bulk = 250000
					weight = 25000
					max_weight = 100000
					max_bulk = 250000
					fixed_bulk = 1



				meduim_checst
					bulk = 150000
					weight = 15000
					max_weight = 100000
					max_bulk = 150000
					fixed_bulk = 1


				small_chest
					bulk = 50000
					weight = 5000
					max_weight = 10000
					max_bulk = 50000
					fixed_bulk = 1


		Bracers

		Amulet

		Wand

		Neckware

		Treasure // presumebly the low down the higher the worth
			New(min as num, max as num)
				if (!min)
					min = rand(1,5)
				if(!max)
					max = rand(5,10)
				value = rand(min,max)
				..()

			var
				value
				timesrate
			icon = 'Misc.dmi'
			FoolsGold
			Copper
				icon_state = "copper"
			Silver
				icon_state = "silver"
				timesrate = 10
			Gold
				icon_state = "gold"
				timesrate = 100
			Platinum
				icon_state = "platinum"
				timesrate = 500
			Mithril
				timesrate = 1000
			Sapphires
				timesrate = 3000
			Emeralds
				timesrate = 6000
			Rubies
				timesrate = 10000
			Diamonds
				timesrate = 50000
			MazTekian_Dollers
				timesrate = 1000000 //  Hahah! :D

		Misc

		Special // something for subscribers maybe? or for winnning cometition and what not
			hairdye
				text = "*"

				Use()
					set src in oview(0)
					var/TRed = input("Please enter a number for the red tint")as num
					var/TBlue = input("Please enter a number for the blue tint")as num
					var/TGreen = input("Please enter a number for the green tint")as num
					var/icon/I = new(usr.icon)
					if (usr.Gender == "male")
						I.SwapColor(rgb(51,0,0),rgb(TRed,TGreen,TBlue))
					else
						I.SwapColor(rgb(204,153,0),rgb(TRed,TGreen,TBlue))
					usr.icon = I
					del(src)



	projectiles
		Arrows


	stairs
		icon = 'turf.dmi'
		var
			destination
			goingup
		A
			name = "stairs"
			DblClick()
				var/list/temp = view(1,src)
				if(temp.Find(usr))
					usr.loc = destination
			verb
				Climb()
					set hidden = 1
					set src = view(1)
					usr.loc = destination
			proc/NewStairs(goingup)
				if(goingup)
					tag = "stairsupA"
					icon_state = "stairsup"
					if(src.z == DUNGEON_START)
						for(var/turf/T in block(locate(1,1,2),locate(300,300,2)))
							for(var/obj/stairs/O in T)
								if(O.tag == "stairsdownA")
									src.destination = O.loc
									O.destination = src.loc
					else
						for(var/turf/T in block(locate(1,1,src.z - 1),locate(300,300,src.z - 1)))
							for(var/obj/stairs/O in T)
								if(O.tag == "stairsdownA")
									src.destination = O.loc
									O.destination = src.loc
				else
					tag = "stairsdownA"
					icon_state = "stairsdown"
		B
			name = "stairs"
			DblClick()
				var/list/temp = view(1,src)
				if(temp.Find(usr))
					usr.loc = destination
			verb
				Climb()
					set hidden = 1
					set src = view(1)
					usr.loc = destination
			proc/NewStairs(goingup)
				if(goingup)
					tag = "stairsupB"
					icon_state = "stairsup"
					for(var/turf/T in block(locate(1,1,src.z - 1),locate(300,300,src.z - 1)))
						for(var/obj/stairs/O in T)
							if(O.tag == "stairsdownB")
								src.destination = O.loc
								O.destination = src.loc
				else
					tag = "stairsdownB"
					icon_state = "stairsdown"

	HUD
		Background
			New()
				name = " "
			icon = 'inventoryguy.PNG'

